from parameterized import parameterized
import requests
import config
from api.ihrm_login_api import IHRMLoginAPI
from common.assert_util import AssertUtil
from common.read_util import ReadUtil

class TestIHRMLogin:
    login_data_file =config.BASE_DIR+"/data/ihrm_login.json"
    # 登录成功
    @parameterized.expand(ReadUtil.read_config(login_data_file))
    def test_login_success(self,body,status_code,success,code,message):
        login_resp = IHRMLoginAPI.login_api(body)
        AssertUtil.ihrm_assert(login_resp, status_code, success,code, message)


